# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("arch") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
version: 13.3
container:
  use_container: 1
var:
  setup: |
    mkdir -p /var/tmp/dist
    tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
    export sysrootdir=/var/tmp/dist/[% project %]/MacOSX[% c("version") %].sdk/
    export clangdir=/var/tmp/dist/[% project %]/clang
    export cctoolsdir=/var/tmp/dist/[% project %]/cctools/bin
    export PATH="$clangdir/bin:$cctoolsdir:$PATH"
    export LD_LIBRARY_PATH=/var/tmp/dist/[% project %]/clang/lib
    export CC="$clangdir/bin/clang [% c('var/FLAGS') %]"
    export LDFLAGS="[% c('var/LDFLAGS') %]"
    export MACOSX_DEPLOYMENT_TARGET=[% c("var/macosx_deployment_target") %]

input_files:
  - project: container-image
  - name: clang
    project: clang
  - name: cctools
    project: cctools
  - name: cmake
    project: cmake
  - name: ninja
    project: ninja
  # Instructions on how to create the SDK tarball can be found at:
  # build/macosx/cross-mozconfig.common
  - name: SDK
    # Original URL: https://swcdn.apple.com/content/downloads/15/62/032-84673-A_7A1TG1RF8Z/xpc8q44ggn2pkn82iwr0fi1zeb9cxi8ath/CLTools_macOSNMOS_SDK.pkg
    URL: https://build-sources.tbb.torproject.org/CLTools_macOSNMOS_SDK-13.3.pkg
    sha256sum: c33545d543a38911aee2a65d4bf7ff4932c12de1e6a042ae38e6415f65a10710
  - name: llvm-project
    project: llvm-project
  - filename: macpkg.py
  - filename: unpack-sdk.py
  - filename: mozbuild_util.py
  - filename: tools.diff
